package com.socialsoftware.MediaCommunication.model;

/**
 * Enum representing different types of WebRTC signaling messages
 */
public enum MessageType {
    CALL_START("call_start"),
    CALL_BACK("call_back"),
    OFFER("offer"),
    ANSWER("answer"),
    ICE("_ice"),
    HANGUP("hangup"),
    SYSTEM_MESSAGE("system_message");

    private final String value;

    MessageType(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static MessageType fromString(String text) {
        for (MessageType type : MessageType.values()) {
            if (type.value.equalsIgnoreCase(text)) {
                return type;
            }
        }
        return null;
    }
} 